﻿<zoil:ZComponent x:Class="ZOIL.Library.Behaviors.ShapeToShapeConnectionView"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 xmlns:zoil="http://zoil.codeplex.com/schemas/2012"
                 mc:Ignorable="d">
    <Canvas>

        <Line x:Name="ConnectorLine" X1="{Binding Path=Model.ConnectionPoint1.X}" Y1="{Binding Path=Model.ConnectionPoint1.Y}"  X2="{Binding Path=Model.ConnectionPoint2.X}" Y2="{Binding Path=Model.ConnectionPoint2.Y}" Stroke="White" StrokeThickness="3" Opacity="0.5" StrokeDashArray="1.5, 0.5"/>
        
        <Ellipse Width="10" Height="10" Fill="YellowGreen" RenderTransformOrigin="0.5, 0.5" Canvas.Left="-5" Canvas.Top="-5" Stroke="White" StrokeThickness="1" Cursor="Hand">
            <Ellipse.RenderTransform>
                <TranslateTransform X="{Binding Path=Model.ConnectionPoint1.X}" Y="{Binding Path=Model.ConnectionPoint1.Y}"/>
            </Ellipse.RenderTransform>
        </Ellipse>
        
        <Ellipse Width="10" Height="10" Fill="YellowGreen" RenderTransformOrigin="0.5, 0.5" Canvas.Left="-5" Canvas.Top="-5" Stroke="White" StrokeThickness="1">
            <Ellipse.RenderTransform>
                <TranslateTransform X="{Binding Path=Model.ConnectionPoint2.X}" Y="{Binding Path=Model.ConnectionPoint2.Y}"/>
            </Ellipse.RenderTransform>
        </Ellipse>
        
    </Canvas>
    
</zoil:ZComponent>
